home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / Shells / zsh / Source / src / funcs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-07  |  6.1 KB  |  189 lines

  1. /* structure for foo=bar assignments */
  2. struct asgment
  3. {
  4.     struct asgment *next;
  5.     char *name, *value;
  6. };
  7.  
  8. #include "builtin.pro"
  9. #include "cond.pro"
  10. #include "exec.pro"
  11. #include "glob.pro"
  12. #include "hist.pro"
  13. #include "init.pro"
  14. #include "jobs.pro"
  15. #include "lex.pro"
  16. #include "loop.pro"
  17. #include "math.pro"
  18. #include "mem.pro"
  19. #include "params.pro"
  20. #include "parse.pro"
  21. #include "subst.pro"
  22. #include "table.pro"
  23. #include "text.pro"
  24. #include "utils.pro"
  25. #include "watch.pro"
  26. #include "zle_hist.pro"
  27. #include "zle_main.pro"
  28. #include "zle_misc.pro"
  29. #include "zle_move.pro"
  30. #include "zle_refresh.pro"
  31. #include "zle_tricky.pro"
  32. #include "zle_utils.pro"
  33. #include "zle_vi.pro"
  34. #include "zle_word.pro"
  35.  
  36. char *mktemp DCLPROTO((char *));
  37.  
  38. #ifndef HAS_STDLIB
  39. char *malloc DCLPROTO((int));
  40. char *realloc DCLPROTO((char *, int));
  41. char *calloc DCLPROTO((int, int));
  42.  
  43. #endif
  44. char *ttyname DCLPROTO((int));
  45.  
  46. extern char PC, *BC, *UP;
  47. extern short ospeed;
  48. extern int tgetent DCLPROTO((char *bp, char *name));
  49. extern int tgetnum DCLPROTO((char *id));
  50. extern int tgetflag DCLPROTO((char *id));
  51. extern char *tgetstr DCLPROTO((char *id, char **area));
  52. extern char *tgoto DCLPROTO((char *cm, int destcol, int destline));
  53. extern int tputs DCLPROTO((char *cp, int affcnt, int (*outc)(int)));
  54.  
  55. /* missing prototypes for various C compilers */
  56.  
  57. #if defined(SOLARIS)
  58. #include <setjmp.h>
  59. /* Solaris does not seem to have prototype for these under /usr/include */
  60. extern char *getdomainname DCLPROTO((char *name, int namelen));
  61. extern FILE     *fdopen(int, const char *);
  62. extern int kill(pid_t, int);
  63. extern int sigaction(int, const struct sigaction *, struct sigaction *);
  64. extern int sighold(int);
  65. extern int sigrelse(int);
  66. extern int sigpause(int);
  67. extern int gettimeofday(struct timeval *tp, struct timezone *tzp);
  68. #endif
  69.  
  70. #if defined(__convexc__)
  71. /* ConvexOS does not seem to have prototypes for these under /usr/include */
  72. extern int bzero(char *b, int length);
  73. extern int gethostname(char *name, int namelen);
  74. extern int getrlimit(int resource, struct rlimit *rlp);
  75. extern int getrusage(int, struct rusage *);
  76. extern int gettimeofday(struct timeval *tp, struct timezone *tzp);
  77. extern int mknod(char *path, int mode, int dev);
  78. extern int nice(int incr);
  79. extern int readlink(char *path, char *buf, int bufsize);
  80. extern int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *expectfds, struct timeval *timeout);
  81. extern int setrlimit(int resource, struct rlimit *rlp);
  82. extern int sigblock(int mask);
  83. extern int sigpause(int sigmask);
  84. extern int sigsetmask(int mask);
  85. extern int sigvec(int sig, struct sigvec *vec, struct sigvec *ovec);
  86. extern int wait3(int *status, int options, struct rusage *rusage);
  87. #endif
  88.  
  89. /* HP/UX 9 c89 */
  90. #if defined(__hpux) && defined(_XPG3) && !defined(_POSIX1_1988)
  91. #define WRITE_ARG_2_T void *
  92. #else
  93. #define WRITE_ARG_2_T char *
  94. #endif
  95.  
  96. #if defined(__hpux) && defined(_HPUX_SOURCE)
  97. #define SELECT_ARG_2_T int *
  98. #else
  99. #define SELECT_ARG_2_T fd_set *
  100. #endif
  101.  
  102. #if defined(__sgi)
  103. #if defined(_POSIX_SOURCE)
  104. /* cc -ansiposix pretends not to see these, maybe too BSDish? */
  105. extern void setpwent(void);
  106. extern void endpwent(void);
  107. extern struct passwd * getpwent(void);
  108. #endif
  109. /* cc -ansi/-ansiposix pretends not to see these, maybe too BSDish/SYSVish? */
  110. #if defined(__STDC__)
  111. #ifdef IRIX5
  112. extern int BSDgettimeofday(struct timeval *tp, struct timezone *tzp);
  113. extern int getrusage(int rwho, struct rusage *rusage);
  114. extern int lstat (const char *path, struct stat *buf);
  115. extern int readlink(const char *path, void *buf, size_t bufsiz);
  116. extern int wait3(union wait *statptr, int options, struct rusage *rusage);
  117. #else
  118. extern int (*BSDsignal(int,int (*)()))();
  119. extern int kill(pid_t pid, int sig);
  120. extern int readlink(const char *pathname, char *buf, int bufsiz);
  121. #endif
  122. extern void bzero(void *b, int length);
  123. extern int gethostname (char *name, int namelen);
  124. extern int ioctl (int fildes, int request, ...);
  125. extern int mknod(const char *pathname, mode_t mode, dev_t dev);
  126. extern int nice(int incr);
  127. extern void seekdir(DIR *dirp, long loc);
  128. extern int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
  129. extern int sighold(int sig);
  130. extern int sigrelse(int sig);
  131. extern int sigpause(int sig);
  132. #endif
  133. #endif
  134.  
  135. #if defined(_CRAY) && defined(__STDC__)
  136. extern FILE *fdopen(int fildes, char *type);
  137. #include <setjmp.h>
  138. typedef int sigjmp_buf[_SJBLEN];
  139. extern int _Sigsetjmp __((sigjmp_buf _Env,int _Savemask));
  140. #define sigsetjmp(_Env, _Savemask)  _Sigsetjmp(_Env, _Savemask)
  141. extern void siglongjmp __((sigjmp_buf _Env, int _Val));
  142. #endif
  143.  
  144. #if defined(__NeXT__)
  145. #if defined(__STRICT_ANSI__) /* -ansi does not see these */
  146. #define bzero(b,len) memset(b,0,len)
  147. extern FILE *fdopen(int filedes, const char *mode);
  148. #endif
  149. /* NeXT has almost everything in
  150.  * /usr/include/bsd/libc.h == <libc.h>
  151.  * (sort of <unistd.h>), except the following */
  152. extern int getppid(void);
  153. #endif
  154.  
  155. #if defined(__osf__) && defined(__alpha)
  156. /* Digital cc does not need these prototypes, gcc does need them */
  157. void bzero(char *string, int length);
  158. int gethostname(char *address, int address_len);
  159. int ioctl(int d, unsigned long request, char *argp);
  160. int mknod(const char *pathname, int mode, dev_t device);
  161. int nice(int increment);
  162. int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) ;
  163. #endif
  164.  
  165. #if defined(DGUX) && defined(__STDC__)
  166. /* Just plain missing. */
  167. extern int getrlimit(int resource, struct rlimit *rlp);
  168. extern int setrlimit(int resource, const struct rlimit *rlp);
  169. extern int getrusage(int who, struct rusage *rusage);
  170. extern int gettimeofday(struct timeval *time_value,
  171.              struct timezone *time_zone);
  172. extern int wait3(union wait *wait_status, int options, struct rusage *rusage);
  173. extern int gethostname(char *nameptr, int maxlength);
  174. extern int getdomainname(char *name, int maxlength);
  175. extern int bzero(char *ptr, int length);
  176. extern int select(int nfds, fd_set *readfds, fd_set *writefds,
  177.           fd_set *exceptfds, struct timeval *timeout);
  178. #endif
  179.  
  180. #if defined(SCO)
  181. struct timezone {
  182.     short minutes;
  183. };
  184. extern void gettimeofday(struct timeval *tv, struct timezone *tz);
  185. extern int nice(int incr);
  186. extern int mknod(char *path, int mode, int dev);
  187. extern int ioctl(int fildes, int request, ...);
  188. #endif
  189.